import Vue from 'vue'
import Router from 'vue-router'
import ProMan from '../windows/ProMan'
import Login from '../windows/Login'
// import Client from '../windows/fordel/fordelClient'
import NewDev from '../windows/NewDev'
import OldDev from '../windows/OldDev'
import Manager from '../windows/Manager'
import Super from '../windows/Super'
import Client2 from '../windows/Client'
import WageManageSuper from '../components/super/WageManageSuper'


Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      name: 'HelloWorld',
      redirect:'/Login'
    },
    {
      path:'/Login',
      name:'loginMa',
      component: Login
    },
    {
      path: '/NewDev',
      name:'new_developer',
      component: NewDev
    },
    {
      path: '/OldDev',
      name:'old_developer',
      component: OldDev
    },
    {
      path: '/Client',
      redirect:'/ClientInfo',
      name:'client',
      component: Client2,//!!!!!!!!!!!!!!!!!!!!!!
      children:[  //正宗的ClientInfo
        {
          path:'/Message',
          component:()=> import('../components/client/Messages')
        },
        {
          path: '/Projects4Client',
          component:()=> import('../components/client/Projects4Client')
        },
        {
          path: '/ClientInfo',
          component:()=> import('../components/common/ClientInfo')
        },
      ]
    },
    {
      path: '/ProMan',
      component: ProMan,  // 前台人员
      // redirect: 'ProMan/ClientInfo',
      redirect: '/SelfInfo',
      // redirect:'/ProMan/SelfInfo',
      children:[  //正宗的SelfInfo
        {
          path: '/SelfInfo',
          component: ()=>import('../components/common/SelfInfo')
        },
        {
          path: '/ProManAddClient',
          component: ()=>import('../components/proMan/ProManAddClient')
        },
        {
          path: '/ProManAddStaff',
          component: ()=>import('../components/proMan/ProManAddStaff')
        },
        {
          path: '/ClientManage',
          component: ()=>import('../components/proMan/ClientManage')
        },
        {
          path: '/StaffManage',
          component: ()=>import('../components/proMan/StaffManage')
        }
      ]
    },
    {
      path: '/Manager',
      component: Manager,
      redirect:'/SelfInfoM',
      children:[
        {
          path: '/SelfInfoM',
          component: ()=>import('../components/common/SelfInfo')
        },
        {
          path: '/AddProject',
          component: ()=>import('../components/manager/AddProject')
        },
        {
          path: '/MyProject',
          component: ()=>import('../components/manager/MyProject')
        },
        {
          path:'/MyNotCompeleteProject',
          component:()=>import('../components/manager/notFinPro')
        },
        {
          path: '/SalaryManage',
          component: ()=>import('../components/manager/SalaryManage')
        },
        {
          path: '/Message4Manage',
          component: ()=>import('../components/manager/Messages4Manager')
        },
      ]
    },
    {
      path: '/NewDev',
      component: NewDev,
      children:[
        {
          path: '/SelfInfoN',
          component: ()=>import('../components/common/SelfInfo')
        },
      ]
    },
    {
      path: '/OldDev',
      component: OldDev,
      redirect:'/SelfInfoO',
      children:[
        {
          path: '/SelfInfoO',
          component: ()=>import('../components/common/SelfInfo')
        },
        {
          path: '/OldMyProject',
          component: ()=>import('../components/oldDev/OldMyProject')
        },
        {
          path: '/OldToDoProject',
          component: ()=>import('../components/oldDev/OldToDoProject')
        },
        {
          path: '/Messages4OldDev',
          component: ()=>import('../components/oldDev/Messages4OldDev')
        },
        {
          path: '/mWage',
          component: ()=>import('../components/oldDev/MWage')
        },
      ]
    },
    {
      path: '/Super',
      component: Super,//!!!!!!!!!!!!!!!!!!!!超级管理员
      children:[
        {
          path: '/SelfInfoSuper',
          component: ()=>import('../components/common/SelfInfo')
        },
        {
          path: '/ProManAddClientSuper',
          component: ()=>import('../components/proMan/ProManAddClient')
        },
        {
          path: '/ClientManageSuper',
          component: ()=>import('../components/proMan/ClientManage')
        },
        {
          path: '/ProManAddStaffSuper',
          component: ()=>import('../components/proMan/ProManAddStaff')
        },
        {
          path: '/StaffManageSuper',
          component: ()=>import('../components/proMan/StaffManage')
        },
        {
          path: '/AddProjectSuper',
          component: ()=>import('../components/manager/AddProject')
        },
        {
          path: '/ProjectManageSuper',
          component: ()=>import('../components/super/ProjectManageSuper')
        },
        {
          path: '/CommitManageSuper',
          component: ()=>import('../components/super/CommitManageSuper')
        },
        {
          path: '/UpLoadFileManageSuper',
          component: ()=>import('../components/super/UploadFileManageSuper')
        },
        {
          path: '/WageManageSuper',
          component: () => import('../components/super/WageManageSuper'),
        }, {
          path: '/SalaryManageSuper',
          component: () => import('../components/super/SalaryManageSuper'),
        },//StaffWork
        {
          path: '/StaffWork',
          component: () => import('../components/super/StaffWOrk'),
        },
      ]
    }
  ]
})
